'use strict';

const conn = require('../../libs/Conn');
const util = require('../../libs/Utils');

module.exports = async function (params) {
    let updateObj = {
        unit_type:params.unit_type,
        unit_name:params.unit_name,
        enable:params.enable,
    };
    let sql = 'UPDATE unit_file SET ? WHERE unit_id = ?;';
    await conn(sql, [updateObj,params.unit_id]);
    return {success: true};
};